using System;
using System.Collections.Generic;
using System.Text;

namespace Barrage.Global
{
    /// <summary>
    /// Static class that holds the number of render calls / culled objects for each frame. Useful for perfomance measuring
    /// </summary>
    public static class RenderStats
    {
        static int renderCalls = 0;
        /// <summary>
        /// Number of mesh Render calls done last frame.
        /// </summary>
        public static int RenderCalls { get { return renderCalls; } set { renderCalls = value; } }
        static int culledObjects = 0;
        /// <summary>
        /// Number of culled (ie. not rendered) objects after cull check. It's value always should be less than RenderCalls
        /// </summary>
        public static int CulledObjects { get { return culledObjects; } set { culledObjects = value; } }

        /// <summary>
        /// Resets the counter stats. Called at the end of each frame
        /// </summary>
        public static void ResetStats()
        {
            RenderCalls = 0;
            CulledObjects = 0;
        }
    }
}
